<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8" />
    <title>13_面试题</title>
</head>

<body>
    <script>
        // (1)
        // var a = { n: 1 };
        // var b = a;
        // 属性赋值的优先级要高于变量赋值的优先级
        // a.x = {n:2};
        // a = {n:2}
        // a.x = a = { n: 2 };
        // console.log(a.x);
        // console.log(b.x);

        // （2）
        // var a = {};
        // var obj1 = {
        //     m: 2
        // }
        // var obj2 = {
        //     n: 2
        // }
        // var obj3 = function () { };

        // a[obj1] = 4
        // a[obj2] = 5
        // a.name = 'kobe'
        // a[obj3] = 6;


        // console.log(a[obj1])
        // console.log(a)

        // (3)
        var b1 = {
            b2: [2, 'atguigu', console.log],
            b3: function () {
                alert('hello')
            }
        }
        console.log(b1, b1.b2, b1.b3)
        console.log(b1 instanceof Object, typeof b1)

        console.log(b1.b2 instanceof Array, typeof b1.b2)
        console.log(b1.b3 instanceof Function, typeof b1.b3)
        
        console.log(typeof b1.b2[2])
        console.log(typeof b1.b2[2]('atguigu'))

        console.log(typeof console.log('atguigu'))

        console.log(console.log('1231232'));
    </script>
</body>

</html>